nums=[2, 3, 1, 0, 2, 5, 3]
def findRepeatNumber(nums) -> int:
    hashTa=dict()
    for i in nums:
        if i not in hashTa:
            hashTa[i]=1
        else:
            return i
    return None


def findRepeatNumber1(nums):
    i=0
    while i<len(nums):
        if nums[i]==i:
            i+=1
            continue
        if nums[i]==nums[nums[i]]:
            return nums[i]
        nums[nums[i]],nums[i]=nums[i],nums[nums[i]]
    return -1


    pass
print(findRepeatNumber1(nums))
